<template>
	<view class="page page-member">
		<view class="member-head flex-row-between">
			<view>有效会员 <text>{{count}}</text></view>
		</view>
		<LoadMore ref="LoadMore" id="LoadMore" :token="true" :diffHeight="110" :initData="initData" @dataRefresh='dataRefresh' @infoRefresh='infoRefresh'>
			<view class="member-list">
				<view class="item" v-for="(item, index) in dataList" :key="index">
					<view class="hr7"></view>
					<view class="p p1 flex-row-between">
						<view class="flex-row-start">
							<view class="photo bg-cover" :style="{backgroundImage: 'url(' +  item.avatar + ')'}"></view>
							<view>{{item.name}}</view>
						</view>
						<view class="font12 font-969696">注册时间：{{item.create_time}}</view>
					</view>
				</view>
			</view>
		</LoadMore>
	</view>
</template>

<script>
	import LoadMore from "@/components/j-loadMore/index.vue";
	export default {
		components: { LoadMore },
		data() {
			return {
				photo: 'https://static.newbeaconhotels.com/app/hotel/my/photo.png', // 默认头像
				count: 0,
				dataList: [],
				// 传参数据
				initData: {
					url: 'coinMember',
					param: {}
				},
			}
		},
		onLoad() {
		},
		methods: {
			// LoadMore返回列表数据
			dataRefresh(e){
				this.dataList = e
			},
			// LoadMore返回信息
			infoRefresh(e){
				this.count = e.count
			}
		}
	}
</script>

<style lang="less">
	@import url("style.less");
</style>
